package com.zys.exercise;

import java.io.FileReader;
import java.io.IOException;

public class text1 {
    public static void main(String[] args) throws IOException {
//        String str = "ni好呀";
//        byte[] bytes = str.getBytes();
//        System.out.println(Arrays.toString(bytes));
//        String str2 = new String(bytes);
//        System.out.println(str2);
        FileReader fr = new FileReader("4-23\\text1");
//        int b ;
//        while ((b = fr.read())!=-1){
//            System.out.print((char) b);
//        }
//        fr.close();
        char[]c = new char[2];
        int b1;
        while ((b1 = fr.read(c))!=-1){
            System.out.print(c);
        }
        fr.close();
    }


}
